package com.sqj.prototypePattern.shallow;

public class Car implements Prototype{
    private String color;

    private String name;

    private String size;

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    @Override
    public Prototype clone() {
        Car car=new Car();
        car.setColor(this.color);
        car.setName(this.name);
        car.setSize(this.size);
        return car;
    }
}
